strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _
    ("Select * from CIM_DataFile where Drive = 'D:' and Name like '%root' and Path like '\\1cTests\\src\\%'")

Set WshShell = WScript.CreateObject("WScript.Shell")
command = WshShell.CurrentDirectory & "\V8Unpack.exe -B "
Set objFSO = CreateObject("Scripting.FileSystemObject")
'If objFSO.FolderExists(WshShell.CurrentDirectory & "\src") Then
'	objFSO.DeleteFolder(WshShell.CurrentDirectory & "\src")
'	objFSO.CreateFolder(WshShell.CurrentDirectory & "\src")
'End If

'Set f = objFSO.GetFolder(WshShell.CurrentDirectory & "\bin")
'Set fc = f.SubFolders
'For Each fold1 in fc
'	path = WshShell.CurrentDirectory & "\src\" & fold1.name
'	On Error Resume Next
'	objFSO.CreateFolder(path) 
'Next

For Each objFile in colFiles
	File = objFSO.GetFile(objFile.name)
	Folder = objFSO.GetFolder(objFSO.GetParentFolderName(File))
'	WScript.echo Folder
	if not objFSO.GetBaseName(Folder) = "Units" then
	
		comm = command & Folder & " " & Replace(objFSO.GetParentFolderName(File),"src","bin") & ".epf"
		WshShell.run comm,0,1
		WScript.echo comm
	end if
Next